package com.hyy.taobao.api.entity;

/**
 * 购物车
 */
public class MyCart {
    private String userName;
    private String goodsName;
    private int goodsPrice;
    private int goodsNumber;

    public MyCart(String userName, String goodsName, int goodsPrice, int goodsNumber) {
        this.userName = userName;
        this.goodsName = goodsName;
        this.goodsPrice = goodsPrice;
        this.goodsNumber = goodsNumber;
    }

    /**
     * 查询购物车商品 上传商品信息
     * @param goodsName
     * @param goodsPrice
     * @param goodsNumber
     */
    public MyCart(String goodsName, int goodsPrice, int goodsNumber) {
        this.goodsName = goodsName;
        this.goodsPrice = goodsPrice;
        this.goodsNumber = goodsNumber;
    }

    /**
     *  查询购物车商品 下传用户名
     * @param userName
     */
    public MyCart(String userName) {
        this.userName = userName;
    }

    /**
     * 删减购物车商品下传用户名和商品名
     * @param userName
     * @param goodsName
     */
    public MyCart(String userName, String goodsName) {
        this.userName = userName;
        this.goodsName = goodsName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public int getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(int goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public int getGoodsNumber() {
        return goodsNumber;
    }

    public void setGoodsNumber(int goodsNumber) {
        this.goodsNumber = goodsNumber;
    }

    @Override
    public String toString() {
        return "[" +
                " 商品名称：" + goodsName +"\t"+
                "| \t 商品单价：" + goodsPrice +"\t"+
                "| \t 商品数量：" + goodsNumber +"\t"+
                "]";
    }
}
